package com.example.Fragment;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.example.Base.BaseFragment;
import com.example.activity.FindDetailActivity;
import com.example.activity.Test2Activity;
import com.example.administrator.olddoctor.MainActivity;
import com.example.administrator.olddoctor.R;
import com.example.tools.IAppCallBack;

/**
 * Created by Administrator on 2016/9/29.
 */
public class FindFragment extends BaseFragment implements View.OnClickListener {
    private Context context;
    private View view;

    private LinearLayout tv_find0,tv_find1,tv_find2,tv_find3,tv_find4,
                             tv_find5,tv_find6 ;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        context = MainActivity.allThis;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        this.onCreate(savedInstanceState);
        view = inflater.inflate(R.layout.fragment_find, container, false);

        tv_find0 = (LinearLayout) view.findViewById(R.id.tv_find0);
        tv_find1 = (LinearLayout) view.findViewById(R.id.tv_find1);
        tv_find2 = (LinearLayout) view.findViewById(R.id.tv_find2);
        tv_find3 = (LinearLayout) view.findViewById(R.id.tv_find3);
        tv_find4 = (LinearLayout) view.findViewById(R.id.tv_find4);
        tv_find5 = (LinearLayout) view.findViewById(R.id.tv_find5);
        tv_find6 = (LinearLayout) view.findViewById(R.id.tv_find6);

        tv_find0.setOnClickListener(this);
        tv_find1.setOnClickListener(this);
        tv_find2.setOnClickListener(this);
        tv_find3.setOnClickListener(this);
        tv_find4.setOnClickListener(this);
        tv_find5.setOnClickListener(this);
        tv_find6.setOnClickListener(this);

        return view;
    }


    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.tv_find0:
//                startActivity(new Intent(getActivity(), FindDetailActivity.class));
                startActivity(new Intent(getActivity(), FindDetailActivity.class));
                break;

            case R.id.tv_find1:
                startActivity(new Intent(getActivity(), FindDetailActivity.class));
                break;
            case R.id.tv_find2:
                startActivity(new Intent(getActivity(), FindDetailActivity.class));
                break;
            case R.id.tv_find3:
                startActivity(new Intent(getActivity(), FindDetailActivity.class));
                break;
            case R.id.tv_find4:
                startActivity(new Intent(getActivity(), FindDetailActivity.class));
                break;
            case R.id.tv_find5:
                startActivity(new Intent(getActivity(), FindDetailActivity.class));
                break;
            case R.id.tv_find6:
                startActivity(new Intent(getActivity(), FindDetailActivity.class));
                break;
        }
    }
}
